<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class imageModel extends Model {
    
    // Get Image by id
    public function getImageById($id) {
        $sql = "SELECT *	
                    FROM image 
                    WHERE idProduct = '$id'
                    ";
        
        $this->_setSql($sql);
        
        // echo $sql;
        $imageReturn = $this->getRow();
        
        // var_dump($imageReturn);
                
        if ($imageReturn) {
            return $imageReturn;
        }
        else         
            return FALSE;
    }
}
?>
